# class Gamer:
#     rank = 9
#
#     def move(self):
#         pass
#
#
# class ChineseGamer(Gamer):
#     nation = "cn"
#
#     def __init__(self, champion):
#         self.champion = champion
#
#
# class KoreaGamer(Gamer):
#     nation = "kr"
#
#
# kejie = ChineseGamer(7)
# print(f"{kejie.champion}冠军 柯洁")
# kejie.champion += 1
# print(f"{kejie.champion}冠军 柯洁")


# class A:
#     def test(self):
#         pass
#
#
# class B(A):
#     def test(self):
#         pass


# class A:
#     a = 'a'
#
#     def __init__(self):
#         print("init a")
#
#
# class B:
#     b = 'b'
#
#     def __init__(self):
#         print("init b")
#
#
# class C(A, B):
#     def __init__(self):
#         # 调用A的init
#         super(C, self).__init__()
#         print("init C")
#
#
# class C(A, B):
#     def __init__(self):
#         # 调用B的init
#         super(A, self).__init__()
#         print("init C")
#
#
# print(C.a)
# print(C.b)
# print(C.__init__)

from math import sqrt


class MyMath:
    def __init__(self):
        pass

    def add_func(*args):
        answer = 0
        print(args)
        for i in args:
            print(i)
            answer += args[i]
        return answer

    def sub_func(*args):
        answer = 0
        print(args)
        for i in args:
            print(i)
            answer -= args[i]
        return answer

    def mul_func(*args):
        answer = 1
        print(args)
        for i in args:
            print(i)
            answer *= args[i]
        return answer

    def div_func(*args):
        answer = args[0]
        print(args)
        for i in args[1:]:
            print(i)
            answer /= args[i]
        return answer

    def power_func(*args):
        answer = []
        print(args)
        for i in args:
            print(i)
            answer.append(i**2)
        return answer

    def spu_func(*args):
        answer = []
        print(args)
        for i in args:
            print(i)
            answer.append(sqrt(i))
        return answer


if __name__ == '__main__':
    print(MyMath.add_func(1, 1, 1))
    print(MyMath.sub_func(1, 1, 1))
    print(MyMath.mul_func(1, 1, 1))
    print(MyMath.div_func(3, 1, 1))
    print(MyMath.power_func(3, 1, 1))
    print(MyMath.spu_func(3, 1, 1))

